package com.itmuch.contentcenter;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import tk.mybatis.spring.annotation.MapperScan;

import java.util.Collections;

@MapperScan("com.itmuch")
//@EnableDiscoveryClient
@EnableFeignClients
@SpringBootApplication
public class ContenCenterApplication {

	public static void main(String[] args) {
		SpringApplication.run(ContenCenterApplication.class, args);
	}

	@Bean
//	@LoadBalanced
//	@SentinelRestTemplate
	public RestTemplate restTemplate() {
		RestTemplate template = new RestTemplate();
//		template.setInterceptors(
//				Collections.singletonList(
//						new TestRestTemplateTokenRelayInterceptor()
//				)
//		);
		return template;
	}
}
